<!--
  Web UI page plugin:
    command
    Version 0.4  Matthias Greiling <matthias@greiling.de>
  
  Dependencies:
    - /xrt/drivemode
  
  Installation:
    - Type:    Page
    - Page:    /usr/command
    - Label:   ⚡
    - Menu:    Main
    - Auth:    Cookie
-->

<script>
$(function() {

	// c- command tile
	$(".ctile").click(function(){
		var failed = false;
		
		if ($(this).hasClass("active")) {

			$.post("/xrt/drivemode", {"load": "0"}, function(data){ failed = data.includes("Failed");});
			
			if (!failed) {
				$(".ctile").removeClass("active");
				$(".master").toggleClass("active");
			} else {
				window.location.reload(true);
			}	
		} else {
		
			$.post("/xrt/drivemode", {"load": $(this).data("load")}, function(data){ failed = data.includes("Failed");});

			if (!failed) {
				$(".ctile").removeClass("active");
				$(this).toggleClass("active");
			} else {
				window.location.reload(true);
			}
		}	
	});

	// l - limit tile
	$(".ltile").click(function(){
		var failed = false;

		if ($(this).hasClass("active")) {
			loadcmd('unlock 0').then(function(output) {
				failed = output.includes("Error");
			});

			if (!failed) {
				$(".ltile").removeClass("active");
			} else {
				window.location.reload(true);
			}
		} else {
			var cmd = "lock " + $(this).data("limit");
			loadcmd(cmd, '#output').then(function(output) {
				failed = output.includes("Error");
			});

			if (!failed) {
				$(".ltile").removeClass("active");
				$(this).toggleClass("active");
			} else {
				window.location.reload(true);
			}
		}	
	});

	// opens websocket - highlights chosen drive mode and limitation
	$('#mainControl').on("msg:metrics", function(ev, update) {
		
		var drivemode = update["xrt.cfg.user"];

		if (drivemode !== null) {
			$("#mainControl .ctile").filter("[data-load=" + drivemode + "]").addClass("active");
		}	
			
		var limitation = update["xrt.v.e.locked.speed"];
		
		if (limitation !== null) {
			$("#mainControl .ltile").filter("[data-limit=" + limitation + "]").addClass("active");
		}

	});
});
</script>
<style>

#main .container-fluid {
	margin:0;
}

.col-sm-1, .col-md-1{
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
} 
.limit .col-sm-1, .limit .col-md-1 {
	background-size: 80%;
}
 
.landscape .col-md-1 {
	width:25vw;
	border: solid black 1px;
	float:left;
	height:50vh;
}

.portrait .col-sm-1 {
	width:50vw;
	border: solid black 1px;
	float:left;
	height:25vh;
}

.green {
	background-color:#578b09;
	background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2248%22%20height%3D%2248%22%20version%3D%221.1%22%20viewBox%3D%220%200%2048%2048%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22m22%2036%2017-12-17-12z%22%20fill%3D%22%23fff%22%2F%3E%3Cpath%20d%3D%22M0%200h48v48H0z%22%20fill%3D%22none%22%2F%3E%3Crect%20x%3D%2214.557%22%20y%3D%2212.113%22%20width%3D%225.4452%22%20height%3D%2223.892%22%20fill%3D%22%23fff%22%20stroke-width%3D%2220.566%22%2F%3E%3C%2Fsvg%3E%0A")
}

.speed {
	background-color:#cf0005;
	background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2248%22%20height%3D%2248%22%20version%3D%221.1%22%20viewBox%3D%220%200%2048%2048%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22m8%2036%2017-12-17-12zm18-24v24l17-12z%22%20fill%3D%22%23eee%22%2F%3E%3Cpath%20d%3D%22M0%200h48v48H0z%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E")
}

.limit {
	background:linear-gradient(0deg, rgba(2,0,36,1) 0%, rgba(153,153,154,1) 38%, rgba(178,212,219,1) 100%);
	display:inline-block;
	background-size: 80%;
}

.snowflake {
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3Asvg%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.0%22%20width%3D%22397%22%20height%3D%22411%22%20id%3D%22svg2%22%3E%3Cdefs%20id%3D%22defs6%22%2F%3E%3Cpath%20d%3D%22M%20183.3125%2C43.09375%20L%20183.3125%2C83.8125%20L%20152.71875%2C66.125%20L%20137.1875%2C92.9375%20L%20183.3125%2C119.65625%20L%20183.3125%2C179.75%20L%20131.5%2C149.8125%20L%20131.40625%2C96.28125%20L%20100.40625%2C96.34375%20L%20100.46875%2C131.90625%20L%2065.09375%2C111.46875%20L%2049.59375%2C138.3125%20L%2084.875%2C158.6875%20L%2054.25%2C176.3125%20L%2069.6875%2C203.1875%20L%20115.90625%2C176.59375%20L%20167.90625%2C206.625%20L%20116.09375%2C236.53125%20L%2069.6875%2C209.84375%20L%2054.25%2C236.71875%20L%2085.0625%2C254.46875%20L%2049.6875%2C274.875%20L%2065.1875%2C301.71875%20L%20100.46875%2C281.34375%20L%20100.40625%2C316.6875%20L%20131.40625%2C316.75%20L%20131.5%2C263.4375%20L%20183.5%2C233.4375%20L%20183.5%2C293.25%20L%20137.1875%2C320.09375%20L%20152.71875%2C346.90625%20L%20183.5%2C329.09375%20L%20183.5%2C369.9375%20L%20214.5%2C369.9375%20L%20214.5%2C329.21875%20L%20245.09375%2C346.90625%20L%20260.625%2C320.09375%20L%20214.5%2C293.375%20L%20214.5%2C233.28125%20L%20266.3125%2C263.21875%20L%20266.40625%2C316.75%20L%20297.40625%2C316.6875%20L%20297.34375%2C281.125%20L%20332.71875%2C301.5625%20L%20348.21875%2C274.71875%20L%20312.9375%2C254.34375%20L%20343.5625%2C236.71875%20L%20328.125%2C209.84375%20L%20281.9375%2C236.4375%20L%20229.90625%2C206.40625%20L%20281.75%2C176.46875%20L%20328.125%2C203.1875%20L%20343.5625%2C176.3125%20L%20312.75%2C158.5625%20L%20348.125%2C138.15625%20L%20332.625%2C111.3125%20L%20297.34375%2C131.6875%20L%20297.40625%2C96.34375%20L%20266.40625%2C96.28125%20L%20266.3125%2C149.59375%20L%20214.3125%2C179.59375%20L%20214.3125%2C119.78125%20L%20260.625%2C92.9375%20L%20245.09375%2C66.125%20L%20214.3125%2C83.9375%20L%20214.3125%2C43.09375%20L%20183.3125%2C43.09375%20z%22%20id%3D%22rect2991%22%20style%3D%22fill%3A%233d7dab%3Bfill-opacity%3A1%3Bstroke%3Anone%22%2F%3E%3C%2Fsvg%3E");
}

.renault {
	background-color:#faa500;
	background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2248%22%20height%3D%2248%22%20version%3D%221.1%22%20viewBox%3D%220%200%2048%2048%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22m18%2036%2017-12-17-12z%22%20fill%3D%22%23fff%22%2F%3E%3Cpath%20d%3D%22M0%200h48v48H0z%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E");
}

.t20 {
	background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2280%22%20height%3D%2280%22%20version%3D%221.1%22%20viewBox%3D%220%200%20640%20640%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20transform%3D%22translate%28-1.6217%20-481.98%29%22%3E%3Cg%20transform%3D%22matrix%287.109%200%200%207.109%20-9.9067%20-6854.2%29%22%20stroke-width%3D%221.0667%22%3E%3Cpath%20d%3D%22m46.635%201032.6c6.2577%200%2012.018%201.1734%2017.28%203.52%205.3333%202.2756%2010.027%205.44%2014.08%209.4933%204.0533%204.0534%207.2177%208.7467%209.4933%2014.08%202.3466%205.2623%203.5199%2011.022%203.52%2017.28-8.8e-5%206.2579-1.1734%2012.053-3.52%2017.387-2.2756%205.3333-5.4401%2010.027-9.4933%2014.08-4.0534%204.0533-8.7467%207.2533-14.08%209.6-5.2623%202.2755-11.022%203.4133-17.28%203.4133-6.2578%200-12.053-1.1378-17.387-3.4133-5.3334-2.3467-10.027-5.5467-14.08-9.6-4.0533-4.0533-7.2533-8.7467-9.6-14.08-2.2756-5.3333-3.4133-11.129-3.4133-17.387%200-6.2578%201.1378-12.018%203.4133-17.28%202.3467-5.3333%205.5467-10.027%209.6-14.08%204.0533-4.0533%208.7466-7.2177%2014.08-9.4933%205.3333-2.3466%2011.129-3.52%2017.387-3.52%22%20fill%3D%22%23fff%22%2F%3E%3Cpath%20d%3D%22m46.635%201031.9c5.9022%200%2011.733%201.1734%2017.493%203.52l2.56%201.28c2.2044%201.1378%204.2666%202.4178%206.1867%203.84%201.991%201.3511%203.8399%202.88%205.5467%204.5866%200.56881%200.569%201.1021%201.1379%201.6%201.7067%200.4977%200.5689%201.031%201.2089%201.6%201.92%200.71103%200.9956%201.671%202.2756%202.88%203.84%204.7644%207.5378%207.1466%2015.644%207.1467%2024.32-8.9e-5%206.1156-1.1734%2011.982-3.52%2017.6l-1.28%202.56c-2.1334%204.3377-4.9423%208.2489-8.4267%2011.733-0.64008%200.5688-1.2445%201.1377-1.8133%201.7066-0.56896%200.5689-1.1734%201.0667-1.8133%201.4934-1.3512%201.1377-2.6667%202.0977-3.9467%202.88-7.3956%204.6933-15.467%207.04-24.213%207.04-6.3289%200-12.196-1.1734-17.6-3.52-0.28447-0.1423-0.64003-0.2845-1.0667-0.4267-0.42669-0.2133-0.92447-0.4623-1.4933-0.7467-2.2045-0.9956-4.2667-2.2044-6.1867-3.6266-1.92-1.4223-3.7689-3.0223-5.5467-4.8-0.5689-0.569-1.1378-1.1378-1.7067-1.7067-0.5689-0.64-1.0667-1.28-1.4933-1.92-0.5689-0.7823-1.1022-1.4933-1.6-2.1333-0.49778-0.64-0.92445-1.2445-1.28-1.8134-4.6933-7.3244-7.04-15.431-7.04-24.32%206e-7%20-6.3288%201.1733-12.16%203.52-17.493%200.14222-0.2844%200.28444-0.64%200.42667-1.0667%200.21333-0.4266%200.46222-0.9244%200.74667-1.4933%201.9911-4.1955%204.8-8.1066%208.4267-11.733%201.5644-1.5643%202.7733-2.631%203.6267-3.2%200.78221-0.5688%201.4933-1.1021%202.1333-1.6%200.63998-0.4977%201.2444-0.9243%201.8133-1.28%207.3244-4.7643%2015.431-7.1466%2024.32-7.1466m0%201.1733c-8.6045%201e-4%20-16.498%202.3112-23.68%206.9333-0.99558%200.4979-2.2756%201.4223-3.84%202.7734-1.28%200.9956-2.4533%202.0623-3.52%203.2-3.3422%203.3422-6.08%207.1467-8.2133%2011.413-0.28445%200.4978-0.53334%200.9601-0.74667%201.3867-0.14223%200.3556-0.28445%200.7111-0.42667%201.0666-2.2756%205.6179-3.4133%2011.307-3.4133%2017.067-7e-7%208.6045%202.3111%2016.498%206.9333%2023.68%200.56888%200.9244%201.0667%201.7067%201.4933%202.3467%200.42666%200.64%200.81777%201.1377%201.1733%201.4933%200.49777%200.64%200.99554%201.2444%201.4933%201.8134%200.56888%200.5688%201.1378%201.1377%201.7067%201.7066%203.3422%203.3422%207.1466%206.08%2011.413%208.2134%200.56886%200.2843%201.0666%200.5333%201.4933%200.7466%200.42664%200.1422%200.7822%200.2844%201.0667%200.4267%205.5466%202.2755%2011.236%203.4133%2017.067%203.4133%208.5333%200%2016.391-2.3111%2023.573-6.9333%200.78215-0.4978%201.4577-0.96%202.0267-1.3867%200.63993-0.4266%201.2444-0.8533%201.8133-1.28%201.2799-1.0666%202.4533-2.1333%203.52-3.2%203.5555-3.5556%206.3288-7.36%208.32-11.413%200.14214-0.4267%200.28436-0.8533%200.42667-1.28%200.21325-0.4267%200.42658-0.8533%200.64-1.28%202.3466-5.4045%203.5199-11.093%203.52-17.067-8.8e-5%20-8.3911-2.3112-16.284-6.9333-23.68-0.42675-0.5688-0.88897-1.1733-1.3867-1.8133-0.42675-0.64-0.88897-1.28-1.3867-1.92-0.99563-1.28-2.0623-2.4533-3.2-3.52-3.5556-3.5555-7.3601-6.3289-11.413-8.32-0.42673-0.1422-0.8534-0.2844-1.28-0.4267-0.42673-0.2133-0.81784-0.4266-1.1733-0.64-5.6889-2.3466-11.378-3.5199-17.067-3.52%22%2F%3E%3Cpath%20d%3D%22m46.635%201045.4c-8.7467%200-16.213%203.0934-22.4%209.28-6.1867%206.1156-9.28%2013.547-9.28%2022.293-1.3e-5%208.7467%203.0933%2016.213%209.28%2022.4%206.1866%206.1867%2013.653%209.28%2022.4%209.28%208.7466%200%2016.178-3.0933%2022.293-9.28%206.1866-6.1866%209.2799-13.653%209.28-22.4-7.5e-5%20-8.7466-3.0934-16.178-9.28-22.293-6.1156-6.1866-13.547-9.28-22.293-9.28m0-10.56c5.76%200%2011.2%201.1023%2016.32%203.3066%205.1199%202.2045%209.5999%205.2268%2013.44%209.0667%203.8399%203.8401%206.8621%208.3201%209.0667%2013.44%202.2044%205.12%203.3066%2010.56%203.3067%2016.32-8.6e-5%205.8312-1.1023%2011.307-3.3067%2016.427-2.2045%205.12-5.2267%209.6-9.0667%2013.44-3.8401%203.84-8.3201%206.8622-13.44%209.0667-5.1201%202.1333-10.56%203.2-16.32%203.2-5.8312%200-11.307-1.0667-16.427-3.2-5.12-2.2045-9.6-5.2267-13.44-9.0667s-6.8622-8.32-9.0667-13.44c-2.1333-5.12-3.2-10.596-3.2-16.427-2.3e-6%20-5.76%201.0667-11.2%203.2-16.32%202.2044-5.1199%205.2267-9.5999%209.0667-13.44%203.84-3.8399%208.32-6.8622%2013.44-9.0667%205.12-2.2043%2010.596-3.3066%2016.427-3.3066%22%20fill%3D%22%23c00%22%2F%3E%3Cpath%20d%3D%22m64.768%201068.3c-6.3e-5%20-0.9244-0.10673-1.7066-0.32-2.3467-0.49784-0.9955-0.85339-1.5999-1.0667-1.8133-0.78228-0.6399-1.3512-1.0311-1.7067-1.1733-0.78228-0.2844-1.4934-0.4266-2.1333-0.4267-0.64006%201e-4%20-1.3512%200.1423-2.1333%200.4267-0.78228%200.3556-1.3512%200.7467-1.7067%201.1733-0.64005%200.64-0.99561%201.2445-1.0667%201.8133-0.21339%200.6401-0.32005%201.4223-0.32%202.3467v15.893c-5.2e-5%200.9245%200.10661%201.7422%200.32%202.4533%200.21328%200.64%200.56884%201.2089%201.0667%201.7067%200.42661%200.4266%200.9955%200.8177%201.7067%201.1733%200.63994%200.2133%201.3511%200.32%202.1333%200.32%200.78216%200%201.4933-0.1067%202.1333-0.32%200.63994-0.2845%201.2088-0.6756%201.7067-1.1733%200.28438-0.2845%200.63994-0.8534%201.0667-1.7067%200.21327-0.7111%200.31994-1.5288%200.32-2.4533v-15.893m-15.893-0.32c-4.7e-5%20-3.3422%201.1022-5.9733%203.3067-7.8933%202.1333-1.92%204.5866-2.88%207.36-2.88%202.7733%200%205.2266%200.96%207.36%202.88%202.1333%201.8489%203.1999%204.48%203.2%207.8933v16.533c-6.9e-5%203.4843-1.0667%206.1155-3.2%207.8933-2.0623%201.8489-4.5156%202.7733-7.36%202.7733-2.8445%200-5.2978-0.9244-7.36-2.7733-2.2045-1.7778-3.3067-4.409-3.3067-7.8933v-16.533%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3Cpath%20d%3D%22m149.6%20445.87v-36.293l104.93-135.57c12.948-16.726%2010.235-41.08-6.0598-54.371-16.317-13.29-40.043-10.504-52.991%206.2202-5.3024%206.8443-8.1827%2015.347-8.1827%2024.079h-37.7c0-42.74%2033.763-77.397%2075.392-77.397%2041.661%200%2075.424%2034.657%2075.424%2077.397%200%2017.576-5.8154%2034.632-16.515%2048.354l-84.829%20108.89h101.34v38.698%22%20stroke-width%3D%221.098%22%2F%3E%3C%2Fsvg%3E%0A");
}

.t30 {
	background-image: url("data:image/svg+xml,%3Csvg%20%20width%3D%2280%22%20height%3D%2280%22%20version%3D%221.1%22%20viewBox%3D%220%200%20640%20640%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20transform%3D%22translate%28-1.6217%20-481.98%29%22%3E%3Cg%20transform%3D%22matrix%287.109%200%200%207.109%20-9.9067%20-6854.2%29%22%20stroke-width%3D%221.0667%22%3E%3Cpath%20d%3D%22m46.635%201032.6c6.2577%200%2012.018%201.1734%2017.28%203.52%205.3333%202.2756%2010.027%205.44%2014.08%209.4933%204.0533%204.0534%207.2177%208.7467%209.4933%2014.08%202.3466%205.2623%203.5199%2011.022%203.52%2017.28-8.8e-5%206.2579-1.1734%2012.053-3.52%2017.387-2.2756%205.3333-5.4401%2010.027-9.4933%2014.08-4.0534%204.0533-8.7467%207.2533-14.08%209.6-5.2623%202.2755-11.022%203.4133-17.28%203.4133-6.2578%200-12.053-1.1378-17.387-3.4133-5.3334-2.3467-10.027-5.5467-14.08-9.6-4.0533-4.0533-7.2533-8.7467-9.6-14.08-2.2756-5.3333-3.4133-11.129-3.4133-17.387%200-6.2578%201.1378-12.018%203.4133-17.28%202.3467-5.3333%205.5467-10.027%209.6-14.08%204.0533-4.0533%208.7466-7.2177%2014.08-9.4933%205.3333-2.3466%2011.129-3.52%2017.387-3.52%22%20fill%3D%22%23fff%22%2F%3E%3Cpath%20d%3D%22m46.635%201031.9c5.9022%200%2011.733%201.1734%2017.493%203.52l2.56%201.28c2.2044%201.1378%204.2666%202.4178%206.1867%203.84%201.991%201.3511%203.8399%202.88%205.5467%204.5866%200.56881%200.569%201.1021%201.1379%201.6%201.7067%200.4977%200.5689%201.031%201.2089%201.6%201.92%200.71103%200.9956%201.671%202.2756%202.88%203.84%204.7644%207.5378%207.1466%2015.644%207.1467%2024.32-8.9e-5%206.1156-1.1734%2011.982-3.52%2017.6l-1.28%202.56c-2.1334%204.3377-4.9423%208.2489-8.4267%2011.733-0.64008%200.5688-1.2445%201.1377-1.8133%201.7066-0.56896%200.5689-1.1734%201.0667-1.8133%201.4934-1.3512%201.1377-2.6667%202.0977-3.9467%202.88-7.3956%204.6933-15.467%207.04-24.213%207.04-6.3289%200-12.196-1.1734-17.6-3.52-0.28447-0.1423-0.64003-0.2845-1.0667-0.4267-0.42669-0.2133-0.92447-0.4623-1.4933-0.7467-2.2045-0.9956-4.2667-2.2044-6.1867-3.6266-1.92-1.4223-3.7689-3.0223-5.5467-4.8-0.5689-0.569-1.1378-1.1378-1.7067-1.7067-0.5689-0.64-1.0667-1.28-1.4933-1.92-0.5689-0.7823-1.1022-1.4933-1.6-2.1333-0.49778-0.64-0.92445-1.2445-1.28-1.8134-4.6933-7.3244-7.04-15.431-7.04-24.32%206e-7%20-6.3288%201.1733-12.16%203.52-17.493%200.14222-0.2844%200.28444-0.64%200.42667-1.0667%200.21333-0.4266%200.46222-0.9244%200.74667-1.4933%201.9911-4.1955%204.8-8.1066%208.4267-11.733%201.5644-1.5643%202.7733-2.631%203.6267-3.2%200.78221-0.5688%201.4933-1.1021%202.1333-1.6%200.63998-0.4977%201.2444-0.9243%201.8133-1.28%207.3244-4.7643%2015.431-7.1466%2024.32-7.1466m0%201.1733c-8.6045%201e-4%20-16.498%202.3112-23.68%206.9333-0.99558%200.4979-2.2756%201.4223-3.84%202.7734-1.28%200.9956-2.4533%202.0623-3.52%203.2-3.3422%203.3422-6.08%207.1467-8.2133%2011.413-0.28445%200.4978-0.53334%200.9601-0.74667%201.3867-0.14223%200.3556-0.28445%200.7111-0.42667%201.0666-2.2756%205.6179-3.4133%2011.307-3.4133%2017.067-7e-7%208.6045%202.3111%2016.498%206.9333%2023.68%200.56888%200.9244%201.0667%201.7067%201.4933%202.3467%200.42666%200.64%200.81777%201.1377%201.1733%201.4933%200.49777%200.64%200.99554%201.2444%201.4933%201.8134%200.56888%200.5688%201.1378%201.1377%201.7067%201.7066%203.3422%203.3422%207.1466%206.08%2011.413%208.2134%200.56886%200.2843%201.0666%200.5333%201.4933%200.7466%200.42664%200.1422%200.7822%200.2844%201.0667%200.4267%205.5466%202.2755%2011.236%203.4133%2017.067%203.4133%208.5333%200%2016.391-2.3111%2023.573-6.9333%200.78215-0.4978%201.4577-0.96%202.0267-1.3867%200.63993-0.4266%201.2444-0.8533%201.8133-1.28%201.2799-1.0666%202.4533-2.1333%203.52-3.2%203.5555-3.5556%206.3288-7.36%208.32-11.413%200.14214-0.4267%200.28436-0.8533%200.42667-1.28%200.21325-0.4267%200.42658-0.8533%200.64-1.28%202.3466-5.4045%203.5199-11.093%203.52-17.067-8.8e-5%20-8.3911-2.3112-16.284-6.9333-23.68-0.42675-0.5688-0.88897-1.1733-1.3867-1.8133-0.42675-0.64-0.88897-1.28-1.3867-1.92-0.99563-1.28-2.0623-2.4533-3.2-3.52-3.5556-3.5555-7.3601-6.3289-11.413-8.32-0.42673-0.1422-0.8534-0.2844-1.28-0.4267-0.42673-0.2133-0.81784-0.4266-1.1733-0.64-5.6889-2.3466-11.378-3.5199-17.067-3.52%22%2F%3E%3Cpath%20d%3D%22m46.635%201045.4c-8.7467%200-16.213%203.0934-22.4%209.28-6.1867%206.1156-9.28%2013.547-9.28%2022.293-1.3e-5%208.7467%203.0933%2016.213%209.28%2022.4%206.1866%206.1867%2013.653%209.28%2022.4%209.28%208.7466%200%2016.178-3.0933%2022.293-9.28%206.1866-6.1866%209.2799-13.653%209.28-22.4-7.5e-5%20-8.7466-3.0934-16.178-9.28-22.293-6.1156-6.1866-13.547-9.28-22.293-9.28m0-10.56c5.76%200%2011.2%201.1023%2016.32%203.3066%205.1199%202.2045%209.5999%205.2268%2013.44%209.0667%203.8399%203.8401%206.8621%208.3201%209.0667%2013.44%202.2044%205.12%203.3066%2010.56%203.3067%2016.32-8.6e-5%205.8312-1.1023%2011.307-3.3067%2016.427-2.2045%205.12-5.2267%209.6-9.0667%2013.44-3.8401%203.84-8.3201%206.8622-13.44%209.0667-5.1201%202.1333-10.56%203.2-16.32%203.2-5.8312%200-11.307-1.0667-16.427-3.2-5.12-2.2045-9.6-5.2267-13.44-9.0667-3.84-3.84-6.8622-8.32-9.0667-13.44-2.1333-5.12-3.2-10.596-3.2-16.427-2.3e-6%20-5.76%201.0667-11.2%203.2-16.32%202.2044-5.1199%205.2267-9.5999%209.0667-13.44%203.84-3.8399%208.32-6.8622%2013.44-9.0667%205.12-2.2043%2010.596-3.3066%2016.427-3.3066%22%20fill%3D%22%23c00%22%2F%3E%3Cpath%20d%3D%22m32.875%201073.3c1.7777%200%203.1644-0.4978%204.16-1.4934%201.0666-0.9244%201.6-2.2044%201.6-3.84-3.6e-5%20-1.4933-0.53337-2.7733-1.6-3.84-1.0667-1.0666-2.3467-1.5999-3.84-1.6-1.1378%201e-4%20-2.2045%200.3912-3.2%201.1733-1.0667%200.7112-1.7422%201.849-2.0267%203.4134h-5.3333c0.07109-2.4889%201.1733-4.8%203.3067-6.9334%201.9911-1.991%204.3377-2.9866%207.04-2.9866%203.2%200%205.8666%201.1022%208%203.3066%201.9911%202.2045%202.9866%204.6579%202.9867%207.3601-4.1e-5%201.3511-0.28448%202.7733-0.85333%204.2666-0.56893%201.28-1.6356%202.4534-3.2%203.52%201.7066%201.1379%202.8444%202.3467%203.4133%203.6267%200.71107%201.3512%201.0666%202.8445%201.0667%204.48-4.2e-5%203.5555-1.1023%206.3289-3.3067%208.32-2.0623%202.0622-4.7289%203.0933-8%203.0933-2.6311%200-4.9422-0.7823-6.9333-2.3466-1.92-1.5645-3.1645-3.9823-3.7333-7.2534h5.3333c0.1422%200.4979%200.28442%200.8889%200.42667%201.1734%200.1422%200.2843%200.28442%200.4977%200.42667%200.64%200.28442%200.4266%200.67553%200.8888%201.1733%201.3866%200.56886%200.4977%201.1022%200.7822%201.6%200.8534%200.35553%200.071%200.67552%200.1422%200.96%200.2133h1.0667c1.4222%200%202.7377-0.4978%203.9467-1.4933%201.1377-1.1378%201.7066-2.5955%201.7067-4.3734-3.7e-5%20-1.7778-0.56892-3.2355-1.7067-4.3733-1.2089-1.0667-2.56-1.6-4.0533-1.6h-2.3467v-4.6933h1.92m31.893-5.0134c-6.3e-5%20-0.9244-0.10673-1.7066-0.32-2.3467-0.49784-0.9955-0.85339-1.5999-1.0667-1.8133-0.78228-0.6399-1.3512-1.0311-1.7067-1.1733-0.78228-0.2844-1.4934-0.4266-2.1333-0.4267-0.64006%201e-4%20-1.3512%200.1423-2.1333%200.4267-0.78228%200.3556-1.3512%200.7467-1.7067%201.1733-0.64005%200.64-0.99561%201.2445-1.0667%201.8133-0.21339%200.6401-0.32005%201.4223-0.32%202.3467v15.893c-5.2e-5%200.9245%200.10661%201.7422%200.32%202.4533%200.21328%200.64%200.56884%201.2089%201.0667%201.7067%200.42661%200.4266%200.9955%200.8177%201.7067%201.1733%200.63994%200.2133%201.3511%200.32%202.1333%200.32%200.78216%200%201.4933-0.1067%202.1333-0.32%200.63994-0.2845%201.2088-0.6756%201.7067-1.1733%200.28438-0.2845%200.63994-0.8534%201.0667-1.7067%200.21327-0.7111%200.31994-1.5288%200.32-2.4533v-15.893m-15.893-0.32c-4.7e-5%20-3.3422%201.1022-5.9733%203.3067-7.8933%202.1333-1.92%204.5866-2.88%207.36-2.88%202.7733%200%205.2266%200.96%207.36%202.88%202.1333%201.8489%203.1999%204.48%203.2%207.8933v16.533c-6.9e-5%203.4843-1.0667%206.1155-3.2%207.8933-2.0623%201.8489-4.5156%202.7733-7.36%202.7733-2.8445%200-5.2978-0.9244-7.36-2.7733-2.2045-1.7778-3.3067-4.409-3.3067-7.8933v-16.533%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E");
}

.t50{
	background-image: url("data:image/svg+xml,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20width%3D%2280%22%20height%3D%2280%22%20viewBox%3D%220%20-643%20600%20600%22%20enable-background%3D%22new%200%20-643%20600%20600%22%20xml%3Aspace%3D%22preserve%22%3E%3Ccircle%20fill%3D%22%23FFFFFF%22%20cx%3D%22300%22%20cy%3D%22-343%22%20r%3D%22292.188%22%2F%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M315.454-642.609C473.958-634.566%2C600-503.502%2C600-343c0%2C165.681-134.307%2C299.993-299.986%2C300h0.014%20c165.688%2C0%2C300-134.314%2C300-300C600.027-503.51%2C473.973-634.579%2C315.454-642.609z%22%2F%3E%3Cpath%20d%3D%22M300-643C134.314-643%2C0-508.685%2C0-343s134.314%2C300%2C300%2C300s300-134.315%2C300-300S465.686-643%2C300-643z%20M300.001-50.811%20%20C138.63-50.811%2C7.813-181.629%2C7.813-343S138.63-635.188%2C300.001-635.188c161.37%2C0%2C292.187%2C130.817%2C292.187%2C292.188%20%20S461.371-50.811%2C300.001-50.811z%22%2F%3E%3Ccircle%20fill%3D%22%23CC0000%22%20cx%3D%22300%22%20cy%3D%22-343%22%20r%3D%22280.805%22%2F%3E%3Ccircle%20fill%3D%22%23FFFFFF%22%20cx%3D%22300%22%20cy%3D%22-343%22%20r%3D%22210.781%22%2F%3E%3Cpath%20d%3D%22M149.984-334.557v-134.408h132.361v35.648h-98.759v56.118c26.224-20.982%2C64.501-16.444%2C84.09%2C4.605%20%20c18.67%2C20.23%2C19.616%2C39.654%2C19.616%2C68.057c0%2C35.461-5.135%2C58.603-36.843%2C77.78c-18.903%2C11.437-49.581%2C12.927-78.804-6.482%20%20c-14.898-9.893-23.653-26.438-26.268-49.636h35.649c4.205%2C19.333%2C16.09%2C28.997%2C35.648%2C28.997c17.398%2C0%2C27.574-5.97%2C30.532-17.91%20%20c5.29-21.366%2C7.433-50.259-2.559-69.763c-4.664-9.096-14.328-13.645-28.997-13.645c-13.76%2C0-24.45%2C6.882-32.066%2C20.639H149.984z%22%2F%3E%3Cpath%20d%3D%22M313.391-289.867v-109.676c0-22.856%2C7.162-40.509%2C21.491-52.961c28.703-24.946%2C69.189-25.076%2C98.162%2C0%20%20c14.384%2C12.452%2C21.577%2C30.105%2C21.577%2C52.961v109.676c0%2C22.856-7.193%2C40.483-21.577%2C52.876c-28.815%2C24.827-69.321%2C24.953-98.162%2C0%20%20C320.553-249.385%2C313.391-267.011%2C313.391-289.867z%20M418.973-291.915v-105.582c0-11.939-3.215-21.262-9.638-27.972%20%20c-17.181-17.937-60.296-14.362-60.296%2C27.972v105.582c0%2C25.273%2C14.823%2C38.038%2C34.967%2C38.038%20%20C404.156-253.878%2C418.973-266.892%2C418.973-291.915z%22%2F%3E%3C%2Fsvg%3E")
}

.t70 {
	background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2280%22%20height%3D%2280%22%20version%3D%221.1%22%20viewBox%3D%220%200%20640%20640%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20transform%3D%22translate%28-1.6217%20-481.98%29%22%3E%3Cg%20transform%3D%22matrix%287.109%200%200%207.109%20-9.9067%20-6854.2%29%22%20stroke-width%3D%221.0667%22%3E%3Cpath%20d%3D%22m46.635%201032.6c6.2577%200%2012.018%201.1734%2017.28%203.52%205.3333%202.2756%2010.027%205.44%2014.08%209.4933%204.0533%204.0534%207.2177%208.7467%209.4933%2014.08%202.3466%205.2623%203.5199%2011.022%203.52%2017.28-8.8e-5%206.2579-1.1734%2012.053-3.52%2017.387-2.2756%205.3333-5.4401%2010.027-9.4933%2014.08-4.0534%204.0533-8.7467%207.2533-14.08%209.6-5.2623%202.2755-11.022%203.4133-17.28%203.4133-6.2578%200-12.053-1.1378-17.387-3.4133-5.3334-2.3467-10.027-5.5467-14.08-9.6-4.0533-4.0533-7.2533-8.7467-9.6-14.08-2.2756-5.3333-3.4133-11.129-3.4133-17.387%200-6.2578%201.1378-12.018%203.4133-17.28%202.3467-5.3333%205.5467-10.027%209.6-14.08%204.0533-4.0533%208.7466-7.2177%2014.08-9.4933%205.3333-2.3466%2011.129-3.52%2017.387-3.52%22%20fill%3D%22%23fff%22%2F%3E%3Cpath%20d%3D%22m46.635%201031.9c5.9022%200%2011.733%201.1734%2017.493%203.52l2.56%201.28c2.2044%201.1378%204.2666%202.4178%206.1867%203.84%201.991%201.3511%203.8399%202.88%205.5467%204.5866%200.56881%200.569%201.1021%201.1379%201.6%201.7067%200.4977%200.5689%201.031%201.2089%201.6%201.92%200.71103%200.9956%201.671%202.2756%202.88%203.84%204.7644%207.5378%207.1466%2015.644%207.1467%2024.32-8.9e-5%206.1156-1.1734%2011.982-3.52%2017.6l-1.28%202.56c-2.1334%204.3377-4.9423%208.2489-8.4267%2011.733-0.64008%200.5688-1.2445%201.1377-1.8133%201.7066-0.56896%200.5689-1.1734%201.0667-1.8133%201.4934-1.3512%201.1377-2.6667%202.0977-3.9467%202.88-7.3956%204.6933-15.467%207.04-24.213%207.04-6.3289%200-12.196-1.1734-17.6-3.52-0.28447-0.1423-0.64003-0.2845-1.0667-0.4267-0.42669-0.2133-0.92447-0.4623-1.4933-0.7467-2.2045-0.9956-4.2667-2.2044-6.1867-3.6266-1.92-1.4223-3.7689-3.0223-5.5467-4.8-0.5689-0.569-1.1378-1.1378-1.7067-1.7067-0.5689-0.64-1.0667-1.28-1.4933-1.92-0.5689-0.7823-1.1022-1.4933-1.6-2.1333-0.49778-0.64-0.92445-1.2445-1.28-1.8134-4.6933-7.3244-7.04-15.431-7.04-24.32%206e-7%20-6.3288%201.1733-12.16%203.52-17.493%200.14222-0.2844%200.28444-0.64%200.42667-1.0667%200.21333-0.4266%200.46222-0.9244%200.74667-1.4933%201.9911-4.1955%204.8-8.1066%208.4267-11.733%201.5644-1.5643%202.7733-2.631%203.6267-3.2%200.78221-0.5688%201.4933-1.1021%202.1333-1.6%200.63998-0.4977%201.2444-0.9243%201.8133-1.28%207.3244-4.7643%2015.431-7.1466%2024.32-7.1466m0%201.1733c-8.6045%201e-4%20-16.498%202.3112-23.68%206.9333-0.99558%200.4979-2.2756%201.4223-3.84%202.7734-1.28%200.9956-2.4533%202.0623-3.52%203.2-3.3422%203.3422-6.08%207.1467-8.2133%2011.413-0.28445%200.4978-0.53334%200.9601-0.74667%201.3867-0.14223%200.3556-0.28445%200.7111-0.42667%201.0666-2.2756%205.6179-3.4133%2011.307-3.4133%2017.067-7e-7%208.6045%202.3111%2016.498%206.9333%2023.68%200.56888%200.9244%201.0667%201.7067%201.4933%202.3467%200.42666%200.64%200.81777%201.1377%201.1733%201.4933%200.49777%200.64%200.99554%201.2444%201.4933%201.8134%200.56888%200.5688%201.1378%201.1377%201.7067%201.7066%203.3422%203.3422%207.1466%206.08%2011.413%208.2134%200.56886%200.2843%201.0666%200.5333%201.4933%200.7466%200.42664%200.1422%200.7822%200.2844%201.0667%200.4267%205.5466%202.2755%2011.236%203.4133%2017.067%203.4133%208.5333%200%2016.391-2.3111%2023.573-6.9333%200.78215-0.4978%201.4577-0.96%202.0267-1.3867%200.63993-0.4266%201.2444-0.8533%201.8133-1.28%201.2799-1.0666%202.4533-2.1333%203.52-3.2%203.5555-3.5556%206.3288-7.36%208.32-11.413%200.14214-0.4267%200.28436-0.8533%200.42667-1.28%200.21325-0.4267%200.42658-0.8533%200.64-1.28%202.3466-5.4045%203.5199-11.093%203.52-17.067-8.8e-5%20-8.3911-2.3112-16.284-6.9333-23.68-0.42675-0.5688-0.88897-1.1733-1.3867-1.8133-0.42675-0.64-0.88897-1.28-1.3867-1.92-0.99563-1.28-2.0623-2.4533-3.2-3.52-3.5556-3.5555-7.3601-6.3289-11.413-8.32-0.42673-0.1422-0.8534-0.2844-1.28-0.4267-0.42673-0.2133-0.81784-0.4266-1.1733-0.64-5.6889-2.3466-11.378-3.5199-17.067-3.52%22%2F%3E%3Cpath%20d%3D%22m46.635%201045.4c-8.7467%200-16.213%203.0934-22.4%209.28-6.1867%206.1156-9.28%2013.547-9.28%2022.293-1.3e-5%208.7467%203.0933%2016.213%209.28%2022.4%206.1866%206.1867%2013.653%209.28%2022.4%209.28%208.7466%200%2016.178-3.0933%2022.293-9.28%206.1866-6.1866%209.2799-13.653%209.28-22.4-7.5e-5%20-8.7466-3.0934-16.178-9.28-22.293-6.1156-6.1866-13.547-9.28-22.293-9.28m0-10.56c5.76%200%2011.2%201.1023%2016.32%203.3066%205.1199%202.2045%209.5999%205.2268%2013.44%209.0667%203.8399%203.8401%206.8621%208.3201%209.0667%2013.44%202.2044%205.12%203.3066%2010.56%203.3067%2016.32-8.6e-5%205.8312-1.1023%2011.307-3.3067%2016.427-2.2045%205.12-5.2267%209.6-9.0667%2013.44-3.8401%203.84-8.3201%206.8622-13.44%209.0667-5.1201%202.1333-10.56%203.2-16.32%203.2-5.8312%200-11.307-1.0667-16.427-3.2-5.12-2.2045-9.6-5.2267-13.44-9.0667-3.84-3.84-6.8622-8.32-9.0667-13.44-2.1333-5.12-3.2-10.596-3.2-16.427-2.3e-6%20-5.76%201.0667-11.2%203.2-16.32%202.2044-5.1199%205.2267-9.5999%209.0667-13.44%203.84-3.8399%208.32-6.8622%2013.44-9.0667%205.12-2.2043%2010.596-3.3066%2016.427-3.3066%22%20fill%3D%22%23c00%22%2F%3E%3Cpath%20d%3D%22m46.422%201058v5.3334l-12.693%2032h-5.9733l12.693-32h-9.92v5.44h-5.3333v-10.773h21.227m19.093%2010.667c-6.3e-5%20-0.7821-0.10673-1.5644-0.32-2.3467-0.14228-0.3555-0.32006-0.6755-0.53333-0.96-0.2134-0.2844-0.39117-0.5688-0.53333-0.8533-0.49784-0.4977-1.0667-0.8888-1.7067-1.1733-0.64006-0.2133-1.3512-0.32-2.1333-0.32-0.78228%200-1.5289%200.1067-2.24%200.32-0.64006%200.3556-1.1734%200.7467-1.6%201.1733-0.2845%200.3556-0.53339%200.6756-0.74667%200.96-0.14228%200.2845-0.24894%200.5689-0.32%200.8533-0.2845%200.8534-0.42672%201.6356-0.42667%202.3467v15.893c-5.2e-5%200.7822%200.14217%201.6%200.42667%202.4533%200.07106%200.2844%200.17772%200.5689%200.32%200.8533%200.21328%200.2844%200.46217%200.6044%200.74667%200.96%200.63995%200.64%201.1733%200.9956%201.6%201.0667%200.56883%200.2844%201.3155%200.4267%202.24%200.4267%200.92438%200%201.6355-0.1423%202.1333-0.4267%200.21327-0.072%200.46216-0.1778%200.74667-0.32%200.28438-0.2133%200.60438-0.4623%200.96-0.7467%200.14216-0.2844%200.31994-0.5689%200.53333-0.8533%200.21327-0.2845%200.39105-0.6045%200.53333-0.96%200.21327-0.7111%200.31994-1.5288%200.32-2.4533v-15.893m-15.893-0.2133c-4.7e-5%20-3.4133%201.1022-6.08%203.3067-8%202.0622-1.8489%204.5155-2.7733%207.36-2.7734%202.6311%201e-4%205.0844%200.9245%207.36%202.7734%202.1333%201.8489%203.1999%204.5156%203.2%208v16.427c-6.8e-5%203.4133-1.0667%206.08-3.2%208-2.2756%201.8488-4.7289%202.7733-7.36%202.7733-2.7023%200-5.1556-0.9245-7.36-2.7733-2.2045-1.7778-3.3067-4.4445-3.3067-8v-16.427%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E")
}

.tile {
	filter: brightness(70%) contrast(64%) saturate(0%) brightness(150%);
}

.active {
	filter: none; 
}

@media (orientation: portrait) {
	.landscape{ display:none}
	.limit {
		background:none;	
	}
	.limit .row{
		background-color:#c0c0c0;
	}
}

@media (orientation: landscape) {
	.portrait{ display:none}
}
</style>
<div id="mainControl" class="receiver" >
	<div class="landscape">
		<div class="row">
			<div data-load="0" class="col-md-1 h-50 w-25 tile ctile renault master"></div>
			<div data-load="1" class="col-md-1 h-50 w-25 tile ctile speed"></div>
			<div data-load="2" class="col-md-1 h-50 w-25 tile ctile green"></div>
			<div data-load="3" class="col-md-1 h-50 w-25 tile ctile snowflake"></div>
		</div>
		<div class="row limit">
			<div data-limit="20" class="col-md-1 h-50 w-25 tile ltile t20"></div>
			<div data-limit="30" class="col-md-1 h-50 w-25 tile ltile t30"></div>
			<div data-limit="50" class="col-md-1 h-50 w-25 tile ltile t50"></div>
			<div data-limit="70" class="col-md-1 h-50 w-25 tile ltile t70"></div>
		</div>
	</div>
	<div class="portrait"> 
		<div class="row">
			<div data-load="0" class="col-sm-1 h-50 w-25 tile ctile renault master"></div>
			<div data-load="1" class="col-sm-1 h-50 w-25 tile ctile speed"></div>
		</div>
		<div class="row">
			<div data-load="2" class="col-sm-1 h-50 w-25 tile ctile green"></div>
			<div data-load="3" class="col-sm-1 h-50 w-25 tile ctile snowflake"></div>
		</div>
		<div class="limit">
			<div class="row ">
				<div data-limit="20" class="col-sm-1 h-50 w-25 tile ltile t20"></div>
				<div data-limit="30" class="col-sm-1 h-50 w-25 tile ltile t30"></div>
			</div>
			<div class="row ">
				<div data-limit="50" class="col-sm-1 h-50 w-25 tile ltile t50"></div>
				<div data-limit="70" class="col-sm-1 h-50 w-25 tile ltile t70"></div>
			</div>
		</div>
	</div>
</div>
